You can change the length of the time slice for one particular process using the schectl() function (see the schedctl(2) reference page). The code would resemble Example 6-5.
Example 6-5 : Setting the Time-Slice Length
#include <sys/schedctl.h> int setMyTimeSliceInTicks(const int ticks) { int ret = schedctl(SLICE,0,ticks) if (-1 == ret) { perror("schedctl(SLICE)"); } return ret; }You might lengthen the time slice for the parent of a process group that will be gang-scheduled (see "Using Gang Scheduling"). This will keep members of the gang executing concurrently longer.